 
function delOption(val1,val2){
	 
        if(window.confirm('确定删除该记录么？'))
        {
       	  window.location.href='/doTradeReg.do?pkid='+val1+'&bpm_id=' + val2; 
        } 		
		
}


function searchForm(){
	  //地区拼串
		var area_attr_str = "";
		if(document.getElementById("province").value!=""){
			area_attr_str += document.getElementById("province").value+"|";
			if(document.getElementById("eparchy_code").value!=""){
				area_attr_str += document.getElementById("eparchy_code").value+"|";
				if(document.getElementById("city_code").value!=""){
					area_attr_str += document.getElementById("city_code").value+"|";
				}
			}
		}


			document.getElementById("search_area_attr").value = area_attr_str;

		
		
		//分类拼串
		var class_attr_str = "";
		if(document.getElementById("sort1").value!=""){
			class_attr_str += document.getElementById("sort1").value + "|";
			if(document.getElementById("sort2").value!=""){
				class_attr_str += document.getElementById("sort2").value + "|";
				if(document.getElementById("sort3").value!=""){
					class_attr_str += document.getElementById("sort3").value + "|";
				}
			}
		
		}

			document.getElementById("search_class_attr").value = class_attr_str;

		
		
		document.indexForm.submit();
	}
	
	
	
function updatestate( val ){
	
	var listsize = document.getElementById('listsize').value;
	var pkid_string = '';
	for(var i=0;i<listsize;i++){
		if(document.getElementById('checkone'+i).checked){
			pkid_string += document.getElementById('checkone'+i).value+'|';
		}
	}
			document.getElementById('pkid').value = pkid_string; 
			if(pkid_string == ''){
				alert('请选择要操作的信息!');
				return false;
			}
			else
			{
				if( val == '0')//推荐
				{
					document.indexForm.action='/doTradeReg.do';
					document.getElementById("recommend").value="1";
					document.getElementById("bpm_id").value="4000";
					document.indexForm.submit();
				}
				if( val == '1')//取消推荐
				{
					document.indexForm.action='/doTradeReg.do';
					document.getElementById("recommend").value="0";
					document.getElementById("bpm_id").value="4001";
					document.indexForm.submit();
				}
				if( val == '2')//审核通过/启用
				{
					document.indexForm.action='/doTradeReg.do';
					document.getElementById("cust_state").value="0";
					document.getElementById("bpm_id").value="4003";
					//if( !chechIfo() ){ return false; }
					document.indexForm.submit();
				}
				if( val == '3')//审核未通过
				{
					document.indexForm.action='/doTradeReg.do';
					document.getElementById("cust_state").value="2";
					document.getElementById("bpm_id").value="4004";
					//if( !chechIfos() ){ return false; }
					document.indexForm.submit();
				}
				if( val == '4')//禁用
				{
					document.indexForm.action='/doTradeReg.do';
					document.getElementById("cust_state").value="3";
					document.getElementById("bpm_id").value="4005";
					//if( !chechIfos() ){ return false; }
					document.indexForm.submit();
				}

 			}	
		}